package com.smoed.common.utilities;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public final class FileUtils {
    private FileUtils() {
    }

    public static void writeToFile(File file, String contents) {
        try {
            BufferedWriter out = new BufferedWriter(new FileWriter(file));
            try {
                out.write(contents);
            } finally {
                out.close();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
